package com.blog.Bard.base.dao;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.blog.Bard.base.pojo.User;
import com.blog.Bard.common.dao.BaseRepository;

public interface UserDao extends BaseRepository<User, Integer>{
	
	/**
	 * 登录检查
	 * @param name
	 * @param password
	 * @return
	 * @throws Exception
	 */
	@Query(nativeQuery = true, value = " select * from user where name=:name and password=:password ")
	User findByNameAndPassword(@Param("name") String name, @Param("password")String password) throws Exception;
	
}
